package com.nongfuspring.nongfu.serviceImpl;

import com.nongfuspring.nongfu.mapper.SystemMapper;
import com.nongfuspring.nongfu.mapper.UserMapper;
import com.nongfuspring.nongfu.pojo.Opinion;
import com.nongfuspring.nongfu.pojo.User;
import com.nongfuspring.nongfu.service.SystemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
@Service
public class SystemServiceImpl implements SystemService {
    @Autowired
    SystemMapper systemMapper;

    @Autowired
    UserMapper userMapper;
    @Override
    public ArrayList<String> getRoles(String userId) {
        return systemMapper.getRoles(userId);
    }

    @Override
    public int add(User user) {
       return userMapper.add(user);
    }

    @Override
    public ArrayList<Opinion> getOpinion() {
        return systemMapper.getOpinion();
    }

    @Override
    public Integer deleteUser(String username) {
        return userMapper.deleteUser(username);
    }
}
